url = 'https://www.acwing.com/problem/content/789/'

def merge_sort(q, l, r):
    if l >= r:
        return
    
    mid = (l + r) // 2
    merge_sort(q, l, mid)
    merge_sort(q, mid+1, r)
    
    k, i, j = 0, l, mid+1
    tmp = [0] * (r-l+1)
    while i <= mid and j <= r:
        if q[i] <= q[j]:
            tmp[k] = q[i]
            k += 1
            i += 1
        else:
            tmp[k] = q[j]
            k += 1
            j += 1
    while i <= mid:
        tmp[k] = q[i]
        k += 1
        i += 1
    while j <= r:
        tmp[k] = q[j]
        k += 1
        j += 1
    
    for i in range(l, r+1):
        q[i] = tmp[i-l]

n = int(input())
a = list(map(int, input().split()))

merge_sort(a, 0, n-1)

print(" ".join(map(str, a)))
